/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2024-03-18     weihui       the first version
 */
#ifndef APPLICATIONS_IMU_IMU_H_
#define APPLICATIONS_IMU_IMU_H_

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

#include "stdint.h"

typedef unsigned char qdata;
typedef unsigned short qsize;

#define QUEUE_MAX_SIZE  64

struct QUEUE
{
  qsize _head; //队列头
  qsize _tail;  //队列尾
  qdata _data[QUEUE_MAX_SIZE];    //队列数据缓存区
};


void imu_init(void);
void get_imu_angel(float *value);
float imu_raw_angle_clc(float initial_angle,float current_angle);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* APPLICATIONS_IMU_IMU_H_ */
